import 'package:flutter/cupertino.dart';

enum EntryItemType {
  home, company, map
}

class EntryItem {
  String iconName;
  String title;
  String subtitle;
  String? detailIconName;
  EntryItemType type;

  bool showDividerLine = true;
  T3EntryItemAxis direction = T3EntryItemAxis.vertical;

  VoidCallback? clicked;
  VoidCallback? clickedDetail;

  EntryItem({
    required this.iconName,
    required this.title,
    required this.type,
    required this.subtitle,
    this.detailIconName,
    this.showDividerLine = true,
    this.direction = T3EntryItemAxis.vertical,
    this.clicked,
    this.clickedDetail,
  });

  @override
  String toString() {
    return "$title - $subtitle";
  }
  
  bool isNoHomeAddress(){
    return subtitle == "设置家地址" && type == EntryItemType.home;
  }

  bool isNoCompanyAddress(){
    return subtitle == "设置公司地址" && type == EntryItemType.company;
  }
  
}

enum T3EntryItemAxis { vertical, horizontal }